package com.coocaa.ops.api.v1.policy.util;

import com.coocaa.ops.api.v1.policy.model.PolicyModel;
import com.coocaa.ops.common.core.biz.policygroup.entity.PolicyGroupInfoEntity;

/**
 * @author tangminghong
 * @date 2020-06-23
 */
public class PolicyResultUtil {

    public static PolicyModel convertToPolicyModel(PolicyGroupInfoEntity policyGroupInfoEntity) {
        PolicyModel policyModel = new PolicyModel();
        policyModel.setId(policyGroupInfoEntity.getId());
        policyModel.setCategory(policyGroupInfoEntity.getPolicyGroupCategory());
        policyModel.setCurrentVersion(policyGroupInfoEntity.getCurrentVersion());
        policyModel.setPlatform(policyGroupInfoEntity.getPlatform());

        policyModel.setHomepageId(policyGroupInfoEntity.getHomepageId());

        return policyModel;
    }
}
